package com.flying.invest.base.service;

import java.util.Date;

import com.flying.common.annotation.DaoCreate;
import com.flying.common.annotation.DaoQuery;
import com.flying.common.annotation.DaoRemove;
import com.flying.common.util.Codes;
import com.flying.framework.annotation.MethodInfo;
import com.flying.framework.annotation.Param;
import com.flying.framework.annotation.Service;
import com.flying.framework.model.ActionResult;
import com.flying.framework.model.QueryResult;
import com.flying.framework.service.AbstractService;
import com.flying.invest.base.model.CurrencyHistory;

@Service(value="CurrencyHistoryService", desc="")
public class CurrencyHistoryService extends AbstractService{
        
	@MethodInfo("新增")
	@DaoCreate(entity=CurrencyHistory.ENTITY_NAME)
	public CurrencyHistory create(
		
			@Param(value=CurrencyHistory.CURRENCY_ID, required=true,	desc="币种ID") Long currency_id,
			@Param(value=CurrencyHistory.CURRENCY, required=true,	desc="币种代码") String currency,
			@Param(value=CurrencyHistory.RATE, required=true,	desc="汇率") Double rate,
			@Param(value=CurrencyHistory.RECORD_DATE, required=true,	desc="汇率日期") Date record_date,
			@Param(value=CurrencyHistory.CREATE_TIME, required=false,	desc="创建时间") Date create_time
		
		) {
		
		return null;
	}

	@MethodInfo("删除")
	@DaoRemove(entity=CurrencyHistory.ENTITY_NAME)
	public ActionResult remove(
		
			@Param(value=CurrencyHistory.HISTORY_ID, required=true,	desc="ID") Long history_id
		
		) throws Exception {
		
		return null;
	}

	@MethodInfo("搜索")
	@DaoQuery(entity=CurrencyHistory.ENTITY_NAME, pageable=true, modelClass=CurrencyHistory.class)
	public QueryResult<CurrencyHistory> findAll(
			@Param(value=Codes.PAGE_NUM, 	required=false, desc="分页页号，默认0") int page,
			@Param(value=Codes.PAGE_SIZE, 	required=false, desc="分页大小，默认10") int rows) throws Exception {
		return null;
	}

	@MethodInfo("查询")
	@DaoQuery(entity=CurrencyHistory.ENTITY_NAME, single=true, throwsNotFoundException=true )
	public CurrencyHistory findById(
		
			@Param(value=CurrencyHistory.HISTORY_ID, required=true,	desc="ID") Long history_id
		) throws Exception {
		return null;
	}

}